package com.demo.sbexample.entity;

import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import org.springframework.boot.autoconfigure.domain.EntityScan;

import javax.validation.constraints.Min;
import java.util.Date;

@TableName(value="sys_user")
public class SysUser {
    @TableId
    private Integer userId;

    private String userNo;
    private String userName;
    private String sex;

    @Min(value = 18, message = "禁止未成年入内")//表示最小18，小于18会报错
    private Integer age;
    private Date birthday;

    @Override
    public String toString() {
        return "SysUser{" +
                "userId=" + userId +
                ", userNo='" + userNo + '\'' +
                ", userName='" + userName + '\'' +
                ", sex='" + sex + '\'' +
                ", age=" + age +
                ", birthday=" + birthday +
                '}';
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getUserNo() {
        return userNo;
    }

    public void setUserNo(String userNo) {
        this.userNo = userNo;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }
}
